<form method="post" name="boo">
<p id="title">  <?php  echo Resource::getResource('changeselloff'); ?>  </p>
<?php
$t = new Trip();
$sum = count($t->gettripandselloff());
$display = 5;
$page = ceil($sum/$display);
$i = 1;
$hihi = 0;
echo '<div class="subpage" ><ul>';
do{
	echo '<li>';
	if(isset($_GET['start']) && (int)$_GET['start'] == ($hihi*$display))
		echo '<a style="background : white;">'.($hihi+1).'</a>';
	else
		echo '<a href = "'.Config::BASEURL.'?_module=Index&_action=changeselloff&start='.($display * $hihi).'">'.($hihi+1).'</a>';
	echo '</li>';
	$hihi+=1;
}while ($hihi < $page);
echo '</div></ul>';
foreach ( $this->objectData as $entity ) {
	$temp = $entity ['pointstart'];
	?>
	<input type="hidden" name="Trip_id<?php echo $i;?>"
			value="<?php echo $entity['tripid']; ?>" />
		<div class="elem" style="width: 41%;margin: 7px 5px;margin-left: 10px;height: 95px;">
			<label for="trip_name"> <?php  echo Resource::getResource('tripname'); ?> </label> 
			<input type="text" name="Trip_name" id="trip_name" disabled="disabled" style="width: 80%;text-align: center;margin-top: 10px;"
				value="<?php echo $entity['pointstart'].' -> '.$entity['pointend'];?>">
		</div>
		<div class="elem" style="width: 37%;margin: 7px 5px;height: 95px;">
			<label for="trip_starttime"> <?php  echo Resource::getResource('starttime'); ?> </label> <input type="text"
				name="Trip_starttime" id="trip_starttime" disabled="disabled" style="width: 80%;text-align: center;margin-top: 10px;"
				value="<?php echo $entity['starttime'];?>">
		</div>
		<div class="elem" style="width: 17%;margin: 7px 5px;height: 95px;">
			<label for="trip_price"> <?php  echo Resource::getResource('price'); ?> </label>
			<input 	type="text" style="width: 30%;text-align: center;margin-left: 18px;margin-top: 10px;"
				   	name="Trip_price<?php echo $i;?>" 
				   	id="trip_price<?php echo $i;?>" 
				   	readonly="readonly"
					value="<?php echo $entity['price']*($entity['saleoff']/100) + $entity['price'];?>">
			<input 	type="text" style="width: 25%;float: right;text-align: center;margin-right: 10px;margin-top: 10px;"
					onfocus="flag(<?php echo $i;?>,<?php echo $entity['price'];?>)" 
					name="Trip_saleoff<?php echo $i;?>"
					id="trip_saleoff<?php echo $i;?>"
					value="<?php echo $entity['saleoff'];?>" >
		</div>
		<button type="submit" onclick="document.boo.submit()"
			style="display: none;">Save</button>
	<?php 	$i +=1;}?>
</form>
 <script>
</script>